package dao

import (
	"doctor_srv/global"
	"doctor_srv/model"
)

func GetRoomList(name string) []model.Room {
	var room []model.Room
	global.DB.Debug().Preload("Children").Where("parent_id = 0").Where("name LIKE ?", "%"+name+"%").Find(&room)
	return room
}
